<template>
  <div>
   <ArrayTestChild :data="data" :add="add"></ArrayTestChild>
  </div>
</template>

<script>
import ArrayTestChild from './ArrayTestChild.vue'
export default {
    components:{ArrayTestChild},
    
  data() {
    return {
      data: {
        a:[]
      }
    };
  },
  methods: {
    add: function(obj) {
        if(!this.data.a){
            this.$set(this.data,"a",[]);
        }
      this.data.a.push(obj);
    }
  }
};
</script>

<style></style>
